home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-09-28 | 3.3 KB | 109 lines |
- '***************************
- '* AMOS Professional *
- '* *
- '* APPEAR *
- '* *
- '* (c) Europress Software *
- '* *
- '* Ronnie Simpson *
- '***************************
- '
- '-------------------------------------------
- 'SETTING UP
- '-------------------------------------------
- ' +----->The command (Produces a fancy fade between two screens)
- ' | +----->The source screen number
- ' | | +----->The destination screen number
- ' | | | +----->The effect to be used
- ' | | | | +----->Number of pixels to be affected (only use
- ' | | | | | if you wish to fade part of the screen)
- ' ^ ^ ^ ^ ^
- ' Appear 1 To 0,1099 [,64000]
- '
- '-------------------------------------------
- 'NOTES
- '-------------------------------------------
- 'Screens are faded in strict order from top to bottom.
- 'The default is to fade the full screen size.
- '
- 'Works best with effect numbers that do not divide evenly into the total
- 'number of pixels for the screen size being used.
- '
- 'Eg. Screen size in use 320 by 200 pixels (the default screen)
- ' Multiply together to give total number of pixels 320*200=64000
- ' Use any effect number that does not divide evenly into 64000
- '
- 'Appearances of fades vary depending on screen modes being used.
- 'Only the destination screen is affected.
- '-------------------------------------------
- 'WORKING EXAMPLE
- '-------------------------------------------
- 'The following program opens 2 screens, draws a random pattern to both and
- 'uses the Appear command to continually fade between the two screens.
- 'A new random pattern is drawn to the 'hidden screen' after each Appear
- 'is complete and the next effect number is read from the data.
- '
- 'PRESS AND HOLD ANY MOUSE KEY TO STOP PROGRAM
- '-------------------------------------------
- '
- '
- Rem *** Open and tidy up 2 screens
- '
- Screen Open 2,320,200,16,Lowres : Curs Off : Flash Off : Paper 0 : Cls 0
- Screen Open 1,320,200,16,Lowres : Curs Off : Flash Off : Paper 0 : Cls 0
- Hide
- Load "AMOSPro_Tutorial:Objects/bobs.abk"
- Get Sprite Palette
- '
- '
- Rem *** Draw an initial random pattern to screen 1
- '
- Set Pattern Rnd(20) : Set Paint 1 : Ink Rnd(15),Rnd(15),4
- Bar 14,20 To 306,180 : Ink 14 : Box 15,21 To 305,179 : Pen 15
- '
- '
- Rem *** Start main loop
- '
- Repeat
- '
- '
- Rem *** read the next effect number to be used
- '
- Read EFFECT : If EFFECT=99 Then Restore
- '
- '
- Rem *** Make screen 1 the current screen and show user what is happening
- '
- Screen 1
- Locate 0,1 : Centre "SCREEN 1"
- Locate 0,23 : Centre " "
- Wait 50
- '
- '
- Rem *** Make screen 2 the current (but hidden) screen and draw new pattern
- '
- Screen 2
- Set Pattern Rnd(20) : Set Paint 1 : Ink Rnd(15),Rnd(15),4
- Bar 14,20 To 306,180
- Ink 14 : Box 15,21 To 305,179
- Locate 0,23 : Centre "SCREEN 2"
- Clip 16,22 To 305,179 : R=Rnd(3)+1
- For Z=1 To 5 : Paste Bob Rnd(210)+13,Rnd(90)+23,R : Next
- '
- '
- Rem *** Now fade between the two screens
- '
- Appear 2 To 1,EFFECT
- For DELAY=1 To 50
- If Mouse Key Then Edit
- Wait Vbl
- Next
- '
- '
- Rem *** repeat if no mouse key is being pressed
- '
- Until Mouse Key
- '
- '
- Edit
- Data 2559,199,3,12799,7,9,11,13,17,19,21,23,27,29,31,33,37,39,41,6399,99